package com.homeinns.esserver.controller;

import com.homeinns.esserver.service.TestUserService;
import com.homeinns.esserver.utils.ResultVOUtil;
import com.homeinns.esserver.vo.ResultVO;
import com.homeinns.esserver.vo.TestUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestUserController
 * @Description TODO
 * @Author 樊志强
 * @Date 2018/9/29 16:17
 **/
@RestController
@RequestMapping("/testuser")
public class TestUserController {

    @Autowired
    private TestUserService testUserService;

    @GetMapping("/{id}")
    public ResultVO<TestUserVO> findById(@PathVariable String id) throws Exception {
        return ResultVOUtil.success(testUserService.findById(id));
    }

}
